﻿@model IEnumerable<Catalog>
@{
    Layout = null;

    var company = IoCHeler.Resolve<ICompanyService>().Get(1) ?? new Company();
}

@if (Model.Count() >= 5)
{
    <div class="homeList picList works">
        <h3 class="title">学校课程<small>/明星课程</small></h3>
        <div class="ulBox">
            <div class="ul">
                <div class="col">
                    <img src="@company.VisitingCard" />
                </div>

                <div class="col col2">
                    <ul>
                        @foreach (var item in Model.Take(2))
                        {
                            <li>
                                <a href="/CMS/Articles/Course?catalogKey=@item.Key">
                                    <img src="@item.ImageUrl" />
                                    <span><b>@item.Name</b>@item.Description</span>
                                </a>
                            </li>
                        }
                    </ul>
                </div>

                <div class="col col2">
                    <ul>
                        @foreach (var item in Model.Skip(2).Take(2))
                        {
                            <li>
                                <a href="/CMS/Articles/Course?catalogKey=@item.Key">
                                    <img src="@item.ImageUrl" />
                                    <span><b>@item.Name</b>@item.Description</span>
                                </a>
                            </li>
                        }
                    </ul>
                </div>
                <div class="col col1">
                    <ul>
                        <li>
                            <a href="/CMS/Articles/Course?catalogKey=@Model.Skip(4).Take(1).FirstOrDefault().Key">
                                <img src="@Model.Skip(4).Take(1).FirstOrDefault().ImageUrl" />
                                <span><b>@Model.Skip(4).Take(1).FirstOrDefault().Name</b>@Model.Skip(4).Take(1).FirstOrDefault().Description</span>
                            </a>
                        </li>
                    </ul>
                </div>
                <div class="clear"></div>
            </div>
        </div>
    </div>
}
